import axios from 'axios';



// 使用示例
const getCaiPiaoHistory = async (page, pageNum) => {
  console.log(`zdy---进入getCaiPiaoHistory page--->${page},pageNum--->${pageNum}`);
  const url = 'http://106.54.8.214:9527/getCaiPiaoHistortApi';
  const params = { page: page, pageNum: pageNum };
  try {
    console.log(`zdy---准备发起请求--->`)
    const response = await axios.get(url, { params: params });
    console.log("zdy------>" + response);
    return Promise.resolve(response.data);
  } catch (error) {
    console.error('zdy--->Error fetching data: ', error);
    return Promise.reject(error)
  }
};

export default getCaiPiaoHistory